package com.mq.service.impl;

import com.mq.dao.IUserDao;
import com.mq.bean.User;
import com.mq.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO 增加注释
 *
 * @author MangoG
 * @version 1.0
 * @since 2018-02-03 15:45:11
 */
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private IUserDao dao;

    @Override
    public long save(User user) {
        return this.dao.save(user);
    }

    @Override
    public void save(List<User> users) {
        this.dao.save(users);
    }

    @Override
    public void update(User user) {
        this.dao.update(user);
    }

    @Override
    public User get(Long id) {
        return this.dao.get(id);
    }

    @Override
    public List<User> list() {
        return this.dao.list();
    }

    @Override
    public void del(Long id) {
        this.dao.del(id);
    }

    public User doUserLogin(User user){return this.dao.doUserLogin(user);}
}
